import Vue from 'vue'
import VueRouter from 'vue-router'
import SchoolIndex from '../components/SchoolIndex'
import System from '../components/System'
import Search from '../components/Search'
import Tell from '../components/Tell'
import Renwu from '../components/Renwu'
import Means from '../components/Means'
import AddPerson from '../components/AddPerson'
import SchoolShow from '../components/SchoolShow'
import Subject from '../components/Subject'
import Grade from '../components/Grade'
import GradeEdit from '../components/GradeEdit'
import Bookstore from '../components/Bookstore'
import Class from '../components/Class'
import ClassEdit from '../components/ClassEdit'
import ListSchool from '../components/ListSchool'

Vue.use(VueRouter)

//所有路由
export default new VueRouter({
    routes: [
        {
            path: '/',
            component: SchoolIndex
        },
        {
            path: '/System',
            component: System,
            name:'/s'
        },
        {
            path: '/Search',
            component: Search
        },
        {
            path: '/Tell',
            component: Tell
        },
        {
            path: '/Renwu',
            component: Renwu
        },
        {
            path: '/Means',
            component: Means
        },
        {
            path: '/addPerson/:role',
            component: AddPerson,
            name:'addPerson'
        },
        {
            path: '/edit/:index',
            component: AddPerson ,
            name: 'edit'
        },
        {
            path: '/show/:id',
            component: SchoolShow,
            name: 'show'
        },
        {
            path: '/Subject',
            component: Subject
        },
        {
            path: '/Grade',
            component: Grade
        },
        {
            path: '/GradeEdit/:index',
            component: GradeEdit,
            name: 'GradeEdit'
        },
        {
            path: '/Bookstore',
            component: Bookstore
        },
        {
            path: '/classAdd/:gradeId',
            component: Class,
            name: 'classAdd'
        },
        {
            path: '/classEdit/:index',
            component: ClassEdit ,
            name: 'classEdit'
        },
        {
            path: '/bookstoreEdit/:index',
            component: Bookstore ,
            name: 'bookstoreEdit'
        },
        {
            path: '/List',
            component: ListSchool ,
        }
    ]
})